package com.runen.wnhz.runen.presenter.model;

import com.runen.wnhz.runen.data.entity.BaseEntity;
import com.runen.wnhz.runen.data.entity.CatalogListEntity;
import com.runen.wnhz.runen.data.entity.LessonIntroductionEntity;
import com.runen.wnhz.runen.data.entity.TestListEntity;
import com.runen.wnhz.runen.service.MajorApi;

import java.util.List;
import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by Administrator on 2018/5/5 0005.
 */

public class CourseDetailsModel {
    MajorApi majorApi;

    public CourseDetailsModel(MajorApi majorApi) {
        this.majorApi = majorApi;
    }

    /**
     * 获取课程简介
     *
     * @param map 参数
     * @return
     */
    public Observable<BaseEntity<LessonIntroductionEntity>> getLessonIntro(@FieldMap Map<String, String> map) {
        return majorApi.getLessonIntroduction(map);
    }

    /**
     * 获取测试内容
     *
     * @param map 参数
     * @return
     */
    public Observable<BaseEntity<TestListEntity>> getLessonTest(@FieldMap Map<String, String> map) {
        return majorApi.getLessonTest(map);
    }


    /**
     * 获取课程目录
     */
    public Observable<BaseEntity<List<CatalogListEntity>>> getCatalog(Map<String, String> map) {
        return majorApi.getCatalog(map);
    }
}
